"""rules_tcl"""

module(
    name = "rules_tcl",
    version = "0.1.1",
)

bazel_dep(name = "bazel_skylib", version = "1.8.2")
bazel_dep(name = "tcl_lang", version = "9.0.2.bcr.1")
bazel_dep(name = "platforms", version = "1.0.0")
bazel_dep(name = "rules_venv", version = "0.7.0")
bazel_dep(name = "rules_req_compile", version = "1.0.0rc41")

http_archive = use_repo_rule("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

http_archive(
    name = "tcllib",
    build_file = "//tcl/private:BUILD.tcllib.bazel",
    integrity = "sha256-ZCwsZ5yQF6tv3tAzJOTOm19Ckkc7YlIOgqrOu2PAziA=",
    strip_prefix = "tcllib-2.0",
    urls = ["https://core.tcl-lang.org/tcllib/uv/tcllib-2.0.tar.xz"],
)

requirements = use_extension("@rules_req_compile//extensions:python.bzl", "requirements")
requirements.parse(
    name = "tcl_pip_deps",
    requirements_locks = {
        "//tools/requirements:requirements_linux_aarch64.txt": "//tools/requirements:linux_aarch64",
        "//tools/requirements:requirements_linux_x86_64.txt": "//tools/requirements:linux_x86_64",
        "//tools/requirements:requirements_macos_aarch64.txt": "//tools/requirements:macos_aarch64",
        "//tools/requirements:requirements_windows_x86_64.txt": "//tools/requirements:windows_x86_64",
    },
)
use_repo(requirements, "tcl_pip_deps")

register_toolchains(
    "//tcl/toolchain",
    dev_dependency = True,
)

bazel_dep(name = "stardoc", version = "0.8.0", dev_dependency = True)
bazel_dep(name = "rules_rust_mdbook", version = "0.67.0", dev_dependency = True)
bazel_dep(name = "rules_shell", version = "0.6.1", dev_dependency = True)

register_toolchains(
    "//tools/toolchains:black_toolchain",
    "//tools/toolchains:isort_toolchain",
    "//tools/toolchains:mypy_toolchain",
    "//tools/toolchains:pylint_toolchain",
    dev_dependency = True,
)
